<template>
    <el-header class="wall-box">
        <el-row class=" header-box">
            <div class="ui-flex logo-box">
                <!-- <img src="../assets/img/gg.png" /> -->
                <h3 class="text">高歌文旅后台管理系统</h3>
            </div>
            <div class="user-box">
                <el-dropdown class="">
                    <span class="user-nav-box">
                      <img :src="userImg" class="layui-circle" width="35" height="35">
                      <span class="cite">{{ userName}}</span>
                    </span>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item>修改密码</el-dropdown-item>
                        <el-dropdown-item>退出</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
            </div>
        </el-row>
    </el-header>
</template>

<script>
import cookie from "js-cookie";
export default {
    name: "indexHeader",
    data() {
        return {
            userName: cookie.get('name'),
            userImg: cookie.get('userImg') || "../assets/img/face.jpg",
        }
    },
};
</script>

<style scoped>
.wall-box {
    background: #23262E;
    width: 100%;
    min-height: 55px;
    z-index: 999;
}

.header-box {
    height: 100%;
}
.logo-box {
    height: 60px;
    float: left;
}

.logo-box img {
    display: inline-block;
    height: 100%;
}

.logo-box .text {
    color: #f5f5f5;
}

/* 用户 */
.user-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    float: right;
}

.user-nav-box{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    color: #fff;
    transition: all .3s;
    -webkit-transition: all .3s;
    height: 50px;
    line-height: 50px;
}
.user-nav-box img{
    border-radius: 100%;
}
.user-nav-box .cite{
    display: block;
    padding: 0 5px;
    font-size: 14px;
}

</style>